<?php session_start();
	include('ketnoi.php');
	$_SESSION['ip']= session_id();
	
	function catchuoi($chuoi,$bd,$gioihan){
    // nếu độ dài chuỗi nhỏ hơn hay bằng vị trí cắt
    // thì không thay đổi chuỗi ban đầu
    if(strlen($chuoi)<=$gioihan)
    {
        return $chuoi;
    }
    else{
        /* 
        so sánh vị trí cắt 
        với kí tự khoảng trắng đầu tiên trong chuỗi ban đầu tính từ vị trí cắt
        nếu vị trí khoảng trắng lớn hơn
        thì cắt chuỗi tại vị trí khoảng trắng đó
        */
        if(strpos($chuoi," ",$gioihan) > $gioihan){
            $new_gioihan=strpos($chuoi," ",$gioihan);
            $new_chuoi = substr($chuoi,0,$new_gioihan)."...";
            return $new_chuoi;
        }
        // trường hợp còn lại không ảnh hưởng tới kết quả
        $new_chuoi = substr($chuoi,0,$gioihan)."...";
        return $new_chuoi;
    }
}

?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tài Chính Kinh Tế Toàn Cầu</title>
<meta name="keywords" content="tai chinh, kinh te, truc tuyen, toan cau, kinhtetoancau.edu.vn" />
<meta name="description" content="" />
<meta http-equiv="expires" content="0">
<script type="text/javascript" src="scripts/jquery_002.js"></script>
<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/jqueryslidemenu.js"></script>
<link rel="stylesheet" type="text/css" href="css/jqueryslidemenu.css">
<script type="text/javascript">$(document).ready(function() { $('#slide').cycle({fx:'scrollDown',timeout:6000,delay:-2000}); });</script>
<script type="text/javascript">$(document).ready(function() { $('#dslide').cycle({fx:'scrollDown',timeout:30000,delay:-2000}); });</script>
<script language="javascript" type="text/javascript">
function reFresh() {
  document.location.reload();
}
/* Set the number below to the amount of delay, in milliseconds,
you want between page reloads: 1 minute = 60000 milliseconds. */
window.setInterval("reFresh()",300000);
</script>
<link href="css/screen.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="scripts/chrome.js"></script>
<script type="text/javascript" src="scripts/library.js"></script>
<link href="css/style_index.css" rel="stylesheet" type="text/css" />
</head>
<body >
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" background="images/bacg.jpg">
       <div><img src="images/banner.jpg"/></div>
    </td>
  </tr>
  <tr>
    <td align="center" background="images/bacg.jpg" >
      <table border="0" cellpadding="0" cellspacing="0" width="1000px">
       <tr>
        <td background="images/menu_3.png" width="22">&nbsp;</td>
        <td align="center">  <div><?php include ('menu.php'); ?></div></td>
        <td background="images/menu_4.png" width="24">&nbsp;</td>
       </tr>
      </table>
     </td>
  </tr>
  <tr>
    <td align="center" height="3px" bgcolor="#000000"  ></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF" >
     <table border="0" cellpadding="0" cellspacing="0" align="center" width="1000px">
     <tr>
          <td align="center" background="images/menu_3.jpg" height="180px" >
          		<div style="position: relative; overflow: hidden;" id="slide" class="slide">
     <?php	
	$query = "SELECT * FROM `".$dulieu."`.`hinhanh` WHERE hienthi=1 order by vitri asc ";	
	$kq = mysql_query($query);
	while($row = mysql_fetch_array($kq)){
	?>
    <img style="position: absolute; top: 180px; left: 0pt; display: none; z-index: 20; opacity: 1; width: 1000px; height: 180px;" src="upload/<?php echo $row['hinh'] ?>" alt="logo" title="logo" width="1000" height="180">
    <?php
	}
	?>
        </div>
          </td>
     </tr>
     <tr>
    <td>
     <div id="content">
		<div id="mainContent" >
 
			<?php
			   $id=$_GET['id'];
				switch($_REQUEST[mod])
				{
				default:
				include ('default.php');
				break;
			   	
			    case "dangky" :
				include ('dangky.php');
				break;
				
				case "cttintuc" :
				include ('chitiettintuc.php');
				break;
				
				case "tintuc" :
				include ('tintuc.php');
				break;
				
				case "tlhoidap" :
				include ('tlhoidap.php');
				break;
				
				case "hoidap" :
				include ('hoidap.php');
				break;
				
				case "gioithieu" :
				include ('gioithieu.php');
				break;
				
				case "lienhe" :
				include ('lienhe.php');
				break;
				
				case "nghiepvu" :
				include ('nghiepvu.php');
				break;
				
				case "lienthong" :
				include ('lienthong.php');
				break;
				
				case "xemnh" :
				include ('xemnh.php');
				break;
				
				case "xemlt" :
				include ('xemlt.php');
				break;
				
				case "lichhoc" :
				include ('lichhoc.php');
				break;
				
			}
			?>
		</div>
        <div id="menu">
		<?php include ('menu2.php'); ?>
		</div>
	</div>
    </td>
  </tr>
     <tr>
         <td align="center" background="images/menu.jpg" height="95px"><span style="color:#FFF; font-size:12px; font-weight:bold">
         <?php
		 $query22 = "select * from  `".$dulieu."`.`trungtam` ";
				$kq22 = mysql_query($query22);
				$row22 = mysql_fetch_array($kq22);
				?>
        <span style="font-variant:small-caps;"> <?php echo $row22['Tentv']; ?></span><BR >
     <span style="font-variant:small-caps;"><?php echo $row22['Ten']; ?></span><br> Tel: <?php echo $row22['sdt'] ?> | Fax: <?php echo $row22['fax'] ?> | Email: <?php echo $row22['mail'];?>
	<BR><?php if($row22['diachi']!= ''){ ?>Địa chỉ: <?php echo $row22['diachi']; }?></span></td>
     </tr>
     </table>

    </td>
  </tr>
 </table>
</body>

</html>
